﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DemoFSUtility
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        //测试Form.Show()
        private void btnOpenShow_Click(object sender, EventArgs e)
        {
            FrmOther frmDlg = null;
            FSUtility.UIForm<FrmOther> findFormUtility = new FSUtility.UIForm<FrmOther>();
            if (findFormUtility.FindOpenedForm(ref frmDlg))
            {
                if (frmDlg != null)
                {
                    frmDlg.Activate();
                }                
            }
            else
            {
                frmDlg = new FrmOther();
                frmDlg.Show(this);
            }
        }

        //测试String和ASCII之间的转换
        private void btnTransformStrASCII_Click(object sender, EventArgs e)
        {
            FrmTransformStrASCII transformDlg = new FrmTransformStrASCII();
            transformDlg.ShowDialog(this);
        }

        //测试图片是否一致
        private void btnImageCompare_Click(object sender, EventArgs e)
        {
            FrmImageCompareHandler imgDlg = new FrmImageCompareHandler();
            imgDlg.ShowDialog(this);
        }
    }
}
